var $path_url = $('base').attr('href');
var controller = $('base').attr('data-controller');

//function loadCampo(){
//    var valorCampo = $('#tipo').val();
//    if(valorCampo == "J"){
//        $('.box-campos').html('').append('<div class="form-group col-lg-2"><div class="input-group">' +
//        '<label>Empresa</label>' +
//        '<input type="text" id="empresa" required="required" placeholder="Empresa" name="empresa" class="form-control" /></div></div>');
//    }else if(valorCampo == "F"){
//        $('.box-campos').html('').append('<div class="form-group col-lg-2"><div class="input-group">' +
//        '<label>Contrato Inicial</label><input type="text" class="form-control" id="contrato_inicial" required="required" name="contrato_inicial"></div></div>');
//    }
//}

function gerar_excel(){
    var dados = $("form[name='form_contas_receber']").serialize();
    location.href = $path_url + controller + "/?"+dados;
}